home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / libexif / exif-loader.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-06-13  |  2.8 KB  |  87 lines

  1. /*! \file exif-loader.h
  2.  * \brief Defines the ExifLoader type
  3.  */
  4. /*
  5.  * Copyright ⌐ 2003 Lutz Mⁿller <lutz@users.sourceforge.net>
  6.  *
  7.  * This library is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU Lesser General Public
  9.  * License as published by the Free Software Foundation; either
  10.  * version 2 of the License, or (at your option) any later version.
  11.  *
  12.  * This library is distributed in the hope that it will be useful, 
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  * Lesser General Public License for more details. 
  16.  *
  17.  * You should have received a copy of the GNU Lesser General Public
  18.  * License along with this library; if not, write to the
  19.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.  * Boston, MA 02111-1307, USA.
  21.  */
  22.  
  23. #ifndef __EXIF_LOADER_H__
  24. #define __EXIF_LOADER_H__
  25.  
  26. #include <libexif/exif-data.h>
  27. #include <libexif/exif-loader.h>
  28. #include <libexif/exif-log.h>
  29. #include <libexif/exif-mem.h>
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif /* __cplusplus */
  34.  
  35. typedef struct _ExifLoader ExifLoader;
  36.  
  37. /*! Allocate a new ExifLoader
  38.  *  \returns the allocated ExifLoader
  39.  */
  40. ExifLoader *exif_loader_new     (void);
  41. /*! Allocate a new ExifLoader using an ExifMem
  42.  *  \param[in] mem the ExifMem
  43.  *  \returns the allocated ExifLoader
  44.  */
  45. ExifLoader *exif_loader_new_mem (ExifMem *mem);
  46. /*! Increase the refcount of the ExifLoader
  47.  *  \param[in] loader the ExifLoader to increase the refcount of.
  48.  */
  49. void        exif_loader_ref     (ExifLoader *loader);
  50. /*! Decrease the refcount of the ExifLoader
  51.  *  \param[in] loader the ExifLoader to decrease the refcount of.
  52.  *  If the refcount reaches 0, the ExifLoader is freeed.
  53.  */
  54. void        exif_loader_unref   (ExifLoader *loader);
  55.  
  56. /*! Write a file to the ExifLoader
  57.  * \param[in] loader the loader
  58.  * \param[in] fname the path to the file to read
  59.  */
  60. void        exif_loader_write_file (ExifLoader *loader, const char *fname);
  61.  
  62. /*! Write a buffer to the ExifLoader
  63.  * \param[in] loader the loader to write too
  64.  * \param[in] buf the buffer to read from
  65.  * \param[in] sz the size of the buffer
  66.  * \returns 1 while EXIF data is read (or while there is still hope that there will be EXIF data later on), 0 otherwise.
  67.  */
  68. unsigned char exif_loader_write (ExifLoader *loader, unsigned char *buf, unsigned int sz);
  69.  
  70. /*! Reset the ExifLoader
  71.  * \param[in] loader the loader
  72.  */
  73. void          exif_loader_reset (ExifLoader *loader);
  74. /*! Get an ExifData out of an ExifLoader
  75.  * \param[in] loader the loader
  76.  * \returns and allocated ExifData
  77.  */
  78. ExifData     *exif_loader_get_data (ExifLoader *loader);
  79.  
  80. void exif_loader_log (ExifLoader *, ExifLog *);
  81.  
  82. #ifdef __cplusplus
  83. }
  84. #endif /* __cplusplus */
  85.  
  86. #endif /* __EXIF_LOADER_H__ */
  87.